/*
 * KKGetMethod.h
 *
 *  Created on: 2013-8-30
 *      Author: wh
 */

#ifndef KKGETMETHOD_H_
#define KKGETMETHOD_H_

#include "kaka_common.h"

typedef enum {
	KKGETSTATE_ERROR = 0, KKGETSTATE_SUCCESS = 1
} KKGetState;

class KKGetMethodListener {
public:
	KKGetMethodListener() {
	}
	virtual ~KKGetMethodListener() {
	}
	virtual void onGetMethodCallBack(KKGetState state, const char* tag,
			std::string result) {
	}
};

class KKGetMethod: public cocos2d::CCObject {
private:
	;CC_SYNTHESIZE(KKGetMethodListener*,m_getMethodListener,GetMethodListener)

protected:
	KKGetMethod();

public:

	virtual ~KKGetMethod();

	;CREATE_FUNC( KKGetMethod)

	virtual bool init();

	void initData(const char* url, const char* tag);

	void onHttpRequestCompleted(cocos2d::extension::CCHttpClient *sender,
			cocos2d::extension::CCHttpResponse *response);
};

#endif /* KKGETMETHOD_H_ */
